package com.example.ui.service;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PersonHystrixService {

    @Autowired
    PersonService personService;

    @HystrixCommand(fallbackMethod = "fallbackSave")
    public String savePerson(String name){
        return personService.savePerson(name);
    }

    public String fallbackSave(){
        return "fallbackSave故障返回";
    }
}
